package com.wr.api.impl;

import com.wr.api.BInterface;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author 王瑞
 * @description: TODO
 * @date 2020/4/16  10:29
 */
@Service
public class BInterfaceimpl implements BInterface {
    public String sayHello_B(String name) {
        String host = RpcContext.getContext().getAttachment("remoteHost");
        return "服务提供者B的方法被调用,当前消费者的ip是："+host+".内容：[sayHello_B:"+name+"]";

    }
}
